package com.hua.common;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * ClassName:Response
 * Package:com.hua.domain
 * Description:
 * @author :chenlong and hua
 * @data: 2022/10/18 16:58
 * @author:ChenJH
 */
@Data
@NoArgsConstructor
public class Response<T> {

    private int code;
    private String msg;
    private T data;
    private String description;
    private String token;

    public Response(int code, T data, String msg, String description, String token) {
        this.code = code;
        this.data = data;
        this.msg = msg;
        this.description = description;
        this.token = token;
    }

    public Response(int code,T data,String msg){
        this(code,data,msg,"","");
    }

    public Response(T data,String msg){
        this(ResponseCode.SUCCESS.getCode(),data,msg,"","");
    }

    public Response(int code,T data,String token,String msg){
        this(code,data,msg,"",token);
    }

}
